From: Jonas Dreßler Date: Sat, 23 Nov 2019 18:57:02 +0000 (+0100) Subject: appDisplay: Remove dragMonitor when FolderIcon is destroyed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~751^2^2~31 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=766e9034e25edff4eb82ebfec46395f29e1a7b87;p=gnome-shell.git appDisplay: Remove dragMonitor when FolderIcon is destroyed While it should be impossible to destroy a FolderIcon while a DnD action is still going on, there might still be rare cases where this happens (ie. when a folder is removed because an app got deleted during DnD). So make sure we're on the safe side here and don't potentially leave dragMonitors around after the icon is destroyed by removing the dragMonitor inside the onDestroy handler of the FolderIcon, just like we do for AppIcons. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/849 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 62a99b9fe..0621acdae 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1515,6 +1515,11 @@ var FolderIcon = GObject.registerClass({ Main.overview.disconnect(this._itemDragBeginId); Main.overview.disconnect(this._itemDragEndId); + if (this._dragMonitor) { + DND.removeDragMonitor(this._dragMonitor); + this._dragMonitor = null; + } + this.view.destroy(); if (this._folderChangedId) {